class Student:
    sex = '男'

    def __init__(self, name, age):
        self.name = name
        self.age = age

    def eat(self):
        print('学生', self.name, '在吃饭')

    @staticmethod
    def drink():
        print('学生', '能喝水')
        return 'haha'

    @classmethod
    def classMethod(cls):
        print(cls.drink())


stu = Student('Jack', 20)
stu.eat()
print(stu.name)
print(stu.age)

Student.eat(stu)

# 类属性调用
print(Student.sex)

stu1 = Student('张三',10)
stu2 = Student('张二',11)

print(stu1.sex)
print(stu2.sex)